﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HouseDetail.aspx.cs" Inherits="HouseDetail" %>

<%@ Register Src="~/App_Widget/Navbar.ascx" TagName="navbar" TagPrefix="UITag" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="App_Themes/simple.css" rel="stylesheet" />
</head>
<body>
    <UITag:navbar runat="server" ID="navbar" />

    <form runat="server">
        <div class="container">
            <div class="page-header">
                <h1><%#HInfo.Address %> <small>房屋信息查看</small>
                    <span id="order-btn" class='<%#(UserType==(int)Model.UserTypeName.客户&&!BLL.HouseOrderManage.HasOrdered(UserId,HInfo.Id))?"":"hidden" %>'>
                        <asp:Button ID="Order" runat="server" CssClass='btn btn-md btn-info' Text="预约" OnClick="OrderBtnClick" />
                    </span>
                    <span id="mark-btn" class='<%#(UserType==(int)Model.UserTypeName.客户&&!BLL.HouseOrderManage.HasOrdered(UserId,HInfo.Id))?"":"hidden" %>'>
                        <asp:Button ID="Mark" runat="server" CssClass='btn btn-md btn-info' Text="收藏"  />
                    </span>
                </h1>
                <div class="dropdown">
                    <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
                        预约列表
                    <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
                        <%
                            List<Model.HouseOrder> list = BLL.HouseOrderManage.GetHouseOrderByHouseId(HInfo.Id);
                            for (int cnt = 0; cnt < list.Count; cnt++ )
                                // 填写预约人列表
                                Response.Write("<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"#\">" + BLL.ClientManage.GetNicknameById(list[cnt].ClientId) +"</a></li>");
                             %>
                        
                    </ul>
                </div>

            </div>
            <div id="house-info">
                <table class="table">
                    <tr>
                        <td>地址</td>
                        <td><%#HInfo.Address %></td>
                    </tr>
                    <tr>
                        <td>出租时间</td>
                        <td><%#HInfo.Duration %></td>
                    </tr>
                    <tr>
                        <td>截止日期</td>
                        <td><%#HInfo.ExpirationDate %></td>
                    </tr>
                    <tr>
                        <td>最晚入住时间</td>
                        <td><%#HInfo.IntakeTime %></td>
                    </tr>
                    <tr>
                        <td>价格</td>
                        <td><%#HInfo.Price %></td>
                    </tr>
                    <tr>
                        <td>规格</td>
                        <td><%#HInfo.Standard %></td>
                    </tr>
                    <tr>
                        <td>缩略图</td>
                        <td>
                            <asp:Image runat="server" CssClass="img-thumbnail img-md" ImageUrl="<%#HInfo.ThumbnailUri %>" />
                        </td>
                    </tr>
                </table>

            </div>
            <!-- End of HouseInfo -->
            <div id="house-comment-list" class="block-info">
                <table class="table">
                    <thead>
                        <tr>
                            <td>评论列表</td>
                        </tr>
                    </thead>
                    <tbody>
                        <asp:Repeater runat="server" ID="rptCommentList">
                            <ItemTemplate>
                                <tr>
                                    <td><%#Eval("Id") %></td>
                                    <td><%#Eval("Content") %></td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </tbody>
                </table>

            </div>



            <div id="house-comment" class="block-info" style="margin-top: 40px">
                <div class="form-group">
                    <asp:Label runat="server" Text="评论"></asp:Label>
                    <asp:TextBox runat="server" TextMode="MultiLine" ID="Comment" CssClass="form-control"></asp:TextBox>
                </div>
                <div class="form-group">
                    <asp:Button runat="server" CssClass="btn btn-primary btn-sm form-control" Text="提交" OnClick="CommentBtnClick" />
                </div>

            </div>
        </div>
    </form>
</body>
</html>
